<?php

namespace app\model;

use think\model\concern\SoftDelete;

class Device extends BaseModel
{
    use SoftDelete;

    protected $defaultSoftDelete = 0;

    public function admin()
    {
        return $this->belongsToMany(Admin::class, 'admin_device_relation', 'admin_id', 'device_id')
            ->withoutField(['id', 'password', 'salt', 'token', 'last_login_ip', 'create_time', 'update_time', 'delete_time']);
    }
}